if self.cur_device is not None and self.cur_device.supported and self.cur_device.device_state != DEVICE_STATE_NOT_FOUND:
if self.cmd_print_int:
s = self._ScrollFunctionsView__tr('Print >>')
else:
s = self._ScrollFunctionsView__tr('Print...')
self.addItem(self._ScrollFunctionsView__tr('<b>Print</b>'), self._ScrollFunctionsView__tr('Print documents or files.'), s, self.PrintPixmap, self.PrintButton_clicked)
if self.cur_device.scan_type:
if self.cmd_scan_int:
s = self._ScrollFunctionsView__tr('Scan >>')
else:
s = self._ScrollFunctionsView__tr('Scan...')
self.addItem(self._ScrollFunctionsView__tr('<b>Scan</b>'), self._ScrollFunctionsView__tr('Scan a document or image.'), s, self.ScanPixmap, self.ScanButton_clicked)
if self.cur_device.fax_type:
if self.cmd_fax_int:
s = self._ScrollFunctionsView__tr('Send PC Fax >>')
else:
s = self._ScrollFunctionsView__tr('Send PC Fax...')
self.addItem(self._ScrollFunctionsView__tr('<b>Send PC Fax</b>'), self._ScrollFunctionsView__tr('Send a fax from the PC.'), s, self.SendFaxPixmap, self.SendFaxButton_clicked)
if self.cur_device.copy_type:
if self.cmd_copy_int:
s = self._ScrollFunctionsView__tr('Make Copies >>')
else:
s = self._ScrollFunctionsView__tr('Make Copies...')
s = self._ScrollFunctionsView__tr('Unload Photo Card >>')
else:
s = self._ScrollFunctionsView__tr('Unload Photo Card...')
self.addItem(self._ScrollFunctionsView__tr('<b>Unload Photo Card</b>'), self._ScrollFunctionsView__tr('Copy images the device to the PC.'), s, self.PhotoCardPixmap, self.PCardButton_clicked)
elif not self.cur_device.supported:
self.addGroupHeading('not_supported', self._ScrollFunctionsView__tr('ERROR: Device not supported.'))
else:
self.addGroupHeading('not_found', self._ScrollFunctionsView__tr('ERROR: Device not found. Please check connection and power-on device.'))
self.FailureUI(self._ScrollFunctionsView__tr("<p><b>Photocards on your printer are only available by mounting them as drives using USB mass storage.</b><p>Please refer to your distribution's documentation for setup and usage instructions."))
self.FailureUI(self._ScrollFunctionsView__tr('<p><b>Unable to run command. No command specified.</b><p>Use <pre>Configure...</pre> to specify a command to run.'))
log.error('No command specified. Use settings to configure commands.')